<?php

namespace Album\Controller;

use Core\Controller\BaseController;
use Model\AlbumTable;

use Zend\View\Model\ViewModel;



class IndexController extends BaseController {
    /**
     * @var AlbumTable
     */
    protected $albumTable;

    public function getAlbumTable()
    {
        if (!$this->albumTable) {
            $this->albumTable = $this->getTableFinder()->getAlbumTable();

        }
        return $this->albumTable;
    }


    public function indexAction() {
       /* try{
            $allAlbum = $this->getAlbumTable()->fetchAll();
            $view = new ViewModel(array(
                'albums' => $allAlbum
            ));

            return $view;
        }catch (\Exception $e){
            \Logger::crit($e->getMessage());
        }*/
    }


    public function test1Action() {

        $view = new ViewModel(array(
            'myName' => 'Thanhnv'
        ));

        return $view;
    }


}